package com.woniuxy.service.impl;

import com.woniuxy.bean.User;
import com.woniuxy.dao.IUserDao;
import com.woniuxy.dao.ManagerDao;
import com.woniuxy.service.IUserService;

import java.util.List;

public class IUserServiceImpl implements IUserService {
    private IUserDao userDao;
    private User user;
    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    @Override
    public void deleteById(int id) {
        userDao.deleteById(id);
    }

    @Override
    public void updateById(User user) {
        userDao.updateById(user);
    }

    @Override
    public void add(User user) {
        userDao.add(user);
    }

    @Override
    public User findId(int id) {

        return userDao.findId(id);
    }

    public void setUserDao(IUserDao userDao) {
        this.userDao = userDao;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
